home *** CD-ROM | disk | FTP | other *** search
- head 1.2;
- access ;
- symbols ;
- locks ; strict;
- comment @ * @;
-
-
- 1.2
- date 88.06.29.15.11.34; author ouster; state Exp;
- branches ;
- next 1.1;
-
- 1.1
- date 88.06.21.11.59.31; author ouster; state Exp;
- branches ;
- next ;
-
-
- desc
- @@
-
-
- 1.2
- log
- @Add ifdefs to keep files from being processed twice.
- @
- text
- @/*
- * Copyright (c) 1982, 1986 Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms are permitted
- * provided that this notice is preserved and that due credit is given
- * to the University of California at Berkeley. The name of the University
- * may not be used to endorse or promote products derived from this
- * software without specific prior written permission. This software
- * is provided ``as is'' without express or implied warranty.
- *
- * @@(#)tcp_seq.h 7.2 (Berkeley) 12/7/87
- */
-
- #ifndef _TCP_SEQ
- #define _TCP_SEQ
-
- /*
- * TCP sequence numbers are 32 bit integers operated
- * on with modular arithmetic. These macros can be
- * used to compare such integers.
- */
- #define SEQ_LT(a,b) ((int)((a)-(b)) < 0)
- #define SEQ_LEQ(a,b) ((int)((a)-(b)) <= 0)
- #define SEQ_GT(a,b) ((int)((a)-(b)) > 0)
- #define SEQ_GEQ(a,b) ((int)((a)-(b)) >= 0)
-
- /*
- * Macros to initialize tcp sequence numbers for
- * send and receive from initial send and receive
- * sequence numbers.
- */
- #define tcp_rcvseqinit(tp) \
- (tp)->rcv_adv = (tp)->rcv_nxt = (tp)->irs + 1
-
- #define tcp_sendseqinit(tp) \
- (tp)->snd_una = (tp)->snd_nxt = (tp)->snd_max = (tp)->snd_up = \
- (tp)->iss
-
- #define TCP_ISSINCR (125*1024) /* increment for tcp_iss each second */
-
- #ifdef KERNEL
- tcp_seq tcp_iss; /* tcp initial send seq # */
- #endif
-
- #endif _TCP_SEQ
- @
-
-
- 1.1
- log
- @Initial revision
- @
- text
- @d15 3
- d45 2
- @
-